import React, { FC, useState } from "react";
import { ComponentType } from "../login";
import IconMap from "@/components/IconMap";
import { loginRules } from "@/utils/rules/loginRule";

const AccountLogin: FC<ComponentType> = (props: ComponentType) => {
  const { Input, FormItem } = props;

  return (
    <>
      <FormItem name="username" rules={loginRules.userRules} hasFeedback>
        <Input
          placeholder="请输入用户名"
          prefix={<IconMap.UserOutlined />}
        ></Input>
      </FormItem>
      <FormItem name="password" rules={loginRules.passwordRules} hasFeedback>
        <Input.Password
          placeholder="请输入密码"
          iconRender={(visible: boolean) =>
            visible ? IconMap.EyeTwoTone : IconMap.EyeInvisibleOutlined
          }
          prefix={IconMap.LockOutlined}
        ></Input.Password>
      </FormItem>
    </>
  );
};

export default AccountLogin;
function useSatte(arg0: boolean): [any, any] {
  throw new Error("Function not implemented.");
}
